package com.yangye.cloud.demo.pay.controller;

import com.yangye.cloud.demo.pay.domain.Pay;
import com.yangye.cloud.demo.pay.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangye
 * @date 2020/10/30
 */
@RestController
@RequestMapping("/pay")
public class PayController {

	@Autowired
	private PayService payService;

	@PostMapping("/success")
	String paySuccess(@RequestBody Pay payInfo) {
		payService.paySuccess(payInfo);
		return "支付成功";
	}

}
